package com.zhaorenxueapp;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.zhaorenxueapp.Text.TitleBuilder;

public class AddressFragment extends Fragment {
    private  View view;
    private View.OnClickListener leftCilckListener;
    private View.OnClickListener rightCilckListener;
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
       view =inflater.inflate(R.layout.tab03, container, false);
        initTitle();
        return view;
    }
    private void initTitle() {
        /**
         * 1.设置左边的图片按钮显示，以及事件
         * 2.设置中间TextView显示的文字
         * 3.设置右边的图片按钮显示，并设置事件
         */
        new TitleBuilder(view)
//                .setLeftImageRes(R.drawable.layout_top_back)
                .setLeftTextOrImageListener(leftCilckListener)
                .setMiddleTitleText("通讯录")
//                .setRightImageRes(R.drawable.layout_right_menu)
                .setRightTextOrImageListener(rightCilckListener);

    }
}
